from rest_framework import generics
from goods.models import GoodsCategory
from meiduo_admin.serializers.categories import CategorySerializer


class CategoryView(generics.ListCreateAPIView):
    queryset = GoodsCategory.objects.filter(subs__isnull=True)
    serializer_class = CategorySerializer